package top.kaoshanji.ch11;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.Map;

/**
 * 代码清单 ch11-01：列出你的平台上可用的所有编码器
 * author kaoshanji
 * ^_^
 * create time 2024/11/20 17:53
 */
public class CharsetsList {

    private static final Logger logger = LogManager.getLogger(CharsetsList.class);

    public static void main(String[] args) {
        logger.info("...代码清单 ch11-01：列出你的平台上可用的所有编码器...");

        Map<String,Charset> map = Charset.availableCharsets();
        Iterator it = map.keySet().iterator();
        while (it.hasNext()) {
            System.out.println(it.next());
        }

    }


}
